<h1 id="logo"><a href="#"><?php print $_SESSION['__config__']['intestazione_scuola'] ?></a>

</h1>
<?php
if(!isset($_SESSION['__user__'])){
	if(basename($_SERVER['PHP_SELF']) == 'index.php'){
?>
<p id="links" style="color: white"><a id="" style="color: white" href='#' onclick='showBox(1)'>Area genitori</a> | <a style="color: white" href='#' onclick="showBox(2)">Area studenti</a> | <a style="color: white" href='#' onclick="showBox(3)">Area scuola</a></p>
<?php 
	}
}
else{
?>
<p id="links" style="color: white">
<?php 
	$groups = $_SESSION['__user__']->getGroups();
	for($i = 0; $i < count($groups); $i++){
		if($groups[$i] == 1){
			print("<a style='color: white' href='".$_SESSION['__config__']['html_root']."admin/index.php'>Amministrazione</a> | ");
		}
		if($groups[$i] == 2){
			print("<a style='color: white' href='".$_SESSION['__config__']['html_root']."intranet/teachers/index.php'>Accedi come docente</a> | ");
		}
		if($groups[$i] == 3){
			print("<a style='color: white' href='".$_SESSION['__config__']['html_root']."intranet/ata/index.php'>Accedi come ATA</a> | ");
		}
		if($groups[$i] == 4){
			print("<a style='color: white' href='".$_SESSION['__config__']['html_root']."intranet/genitori/index.php'>Accedi come genitore</a> | ");
		}
		if($groups[$i] == 6){
			print("<a style='color: white' href='".$_SESSION['__config__']['html_root']."intranet/office/index.php'>Accedi alle funzioni di segreteria</a> | ");
		}
		if($groups[$i] == 7){
			print("<a style='color: white' href='".$_SESSION['__config__']['html_root']."intranet/manager/index.php'>Accedi come DS</a> | ");
		}
		
	}
	print("<a style='color: white' href='".$_SESSION['__config__']['html_root']."shared/do_logout.php'>Logout</a>");
}
?>
</p>